package xj.graph2d.app.prop;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JCheckBoxMenuItem;

import xj.graph2d.app.DrawAction;

public class RulerOptionListener extends DrawAction implements ActionListener {

  public void actionPerformed(ActionEvent e) {
    Object src = e.getSource();
    if (src instanceof JCheckBoxMenuItem) {
      JCheckBoxMenuItem cm = (JCheckBoxMenuItem) src;
      String cmd = cm.getActionCommand();
      main.setShowRuler(cm.getState());
    }
  }

}
